Don't allow the type of encryption of an existing special remote to be changed.
authorJoey Hess <joeyh@joeyh.name>
Thu, 21 Aug 2025 17:41:00 +0000 (13:41 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 21 Aug 2025 17:41:00 +0000 (13:41 -0400)
commit6b63fb7ea29f39b0fe7632dae6951c589115ee37
tree83b3ec19971bb6b87606362535af313453faffd1
parent117b520825669f0bfc8db7d3ddf80ae6768b8185
Don't allow the type of encryption of an existing special remote to be changed.

eg, git-annex enableremote foo encryption=none will not remove encryption,
and other encryption= settings don't change the type of encryption used.
Either of which would render data stored in a special remote inaccessible.

Probably fixes reversion introduced in
71f78fe45dc91dbef0bedd79b33d6a9fed85704d.
That commit got rid of the hasEncryptionConfig check, which I think would
have detected this before. I've not gone back to verify that.

Sponsored-by: mycroft
18 files changed:
CHANGELOG
Remote/Adb.hs
Remote/Bup.hs
Remote/Ddar.hs
Remote/Directory.hs
Remote/External.hs
Remote/GCrypt.hs
Remote/GitLFS.hs
Remote/Glacier.hs
Remote/Helper/Encryptable.hs
Remote/Hook.hs
Remote/HttpAlso.hs
Remote/Mask.hs
Remote/Rsync.hs
Remote/S3.hs
Remote/WebDAV.hs
Types/Crypto.hs
doc/bugs/prevent_enableremote_changing_encryption.mdwn